﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true" CodeBehind="OrderShips.aspx.cs" Inherits="TimKen.Web.order.OrderShips" %>
<%@ Register src="../UserControls/UserCenter.ascx" tagname="UserCenter" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
<uc1:UserCenter ID="UserCenter1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <script src="../Common/Script/jquery-1.7.2/jquery-1.7.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            $(".orderItem").click(function () {
                var items = $(this).next();
                if (items.is(':visible')) {
                    items.slideUp();
                } else {
                    items.slideDown();
                }
            })
        })
    </script>
    <form runat="server">
    <div class="rtitle">
        <%=GetLangString("ShipInfo")%>
    </div>
    <div class="orderinfo">
        <ul>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("OrderNo")%>：
                </div>
                <asp:Label ID="labOrderNo" runat="server" Text=""></asp:Label>&nbsp;
                <asp:HiddenField ID="labOrderID" runat="server" />
            </li>
            <li>
                <div class="right orderinforight">
                    <div class="orderinfotitle">
                        <%=GetLangString("ShippingType")%>：</div>
                    <asp:Label ID="labTransType" runat="server" Text=""></asp:Label>
                </div>
                <div class="orderinfotitle">
                    <%=GetLangString("OrderDate")%>：</div>
                <asp:Label ID="labCreateDate" runat="server" Text=""></asp:Label></li>
            <li>
                <div class="right orderinforight">
                    <div class="orderinfotitle">
                        <%=GetLangString("LinkManID")%>：</div>
                    <asp:Label ID="labContactPerson" runat="server" Text=""></asp:Label>
                </div>
                <div class="orderinfotitle">
                    <%=GetLangString("LMName")%>：</div>
                <asp:Label ID="labLMName" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="right orderinforight">
                    <div class="orderinfotitle">
                        <%=GetLangString("Telephone")%>：</div>
                    <asp:Label ID="labTelephone" runat="server" Text=""></asp:Label>
                </div>
                <div class="orderinfotitle">
                    <%=GetLangString("Mobile")%>：</div>
                <asp:Label ID="labMobile" runat="server" Text=""></asp:Label></li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("Email")%>：
                </div>
                <asp:Label ID="labEmail" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("Address")%>：
                </div>
                <asp:Label ID="labAddress" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("Remark")%>：
                </div>
                <asp:Label ID="labRemark" runat="server"></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("SalesPersonCode")%>：
                </div>
                <asp:Label ID="labSalesPersonCode" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("BillAddress")%>：
                </div>
                <asp:Label ID="labBillAddress" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("ShipArea")%>：
                </div>
                <asp:Label ID="labShipTo" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <div class="orderinfotitle">
                    <%=GetLangString("ShipAddress")%>：
                </div>
                <asp:Label ID="labShipAddress" runat="server"></asp:Label>
            </li>
            <li>
                <div class="right orderinforight">
                    <div class="orderinfotitle">
                        <%=GetLangString("OrderStatus")%>：</div>
                    <asp:Label ID="labOrderStatus" runat="server" Text=""></asp:Label>
                </div>
                <div class="orderinfotitle">
                    <%=GetLangString("ContractStatus")%>：</div>
                <asp:Label ID="labContractStatus" runat="server" Text=""></asp:Label></li>
        </ul>
    </div>
    <div class="msglist txtright">
        <%=GetLangString("ClickShowItemShips")%>
    </div>
    <asp:Repeater ID="repOrderShipItems" runat="server" OnItemDataBound="repOrderShipItems_ItemDataBound">
        <HeaderTemplate>
            <table class="rtable" cellspacing="0">
                <tr>
                    <th class="topleft" style="width: 59px">
                        &nbsp;<%#GetLangString("OrderItemNo")%></th>
                    <th width="100px">
                        <%#GetLangString("ItemCode")%>
                    </th>
                    <th width="70px">
                        <%#GetLangString("ShopNumber")%>
                    </th>
                    <th style="width: 79px">
                        <%#GetLangString("SalesUnit")%>
                    </th>
                    <th style="width: 76px">
                        <%#GetLangString("UnitPrice")%>
                    </th>
                    <th style="width: 98px">
                        <%#GetLangString("RowPrice")%>
                    </th>
                    <th style="width: 111px">
                        <%#GetLangString("RowTotalPrice")%>
                    </th>
                    <th width="120px" class="topright">
                        <b>
                            <%#GetLangString("DeliveryedQty")%></b>
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="orderItem">
                <td class="first" style="width: 59px"> <%#Eval("ItemNo") %>&nbsp; </td>
                <td><a href="../ProductInfo.aspx?ProductID=<%#Eval("ProductID") %>"> <%#Eval("ItemCode") %></a> </td>
                <td> <%#Eval("Quantity") %> </td>
                <td style="width: 79px"> <%#Eval("Unit") %> </td>
                <td style="width: 76px"> <%#decimal.Round(decimal.Parse(Eval("FinalPrice").ToString()), 2).ToString()%> RMB</td>
                <td style="width: 98px"> <%#decimal.Round(decimal.Parse(Eval("BaseAmount").ToString()), 2).ToString()%> RMB</td>
                <td style="width: 111px"> <%#decimal.Round(decimal.Parse(Eval("TotalAmount").ToString()), 2).ToString()%> RMB</td>
                <td class="last"> <%#Eval("DeliveryQty")%> </td>
            </tr>
            <!--隐藏部分-->
            <tr class="shipItems" style="display: none">
                    <td colspan="8">
                        <asp:Label ID="labNoItems" runat="server" Text='<%#GetLangString("NoItemShips") %>'
                            Visible="false"></asp:Label>
                        <table class="orderlisttable" width="300px">
                            <asp:Repeater ID="repShipItems" runat="server" DataSource='<%#GetShipItems(Eval("OrderItemID").ToString())%>'>
                                <HeaderTemplate>
                                    <tr>
                                        <th>
                                            <%#GetLangString("ShipNo") %>
                                        </th>
                                        <th>
                                            <%#GetLangString("ShipItemNo") %>
                                        </th>
                                        <th>
                                            <%#GetLangString("ShipDate") %>
                                        </th>
                                        <th>
                                            <%#GetLangString("ShipQty") %>
                                        </th>
                                        <th>
                                            <%#GetLangString("ShipUnit") %>
                                        </th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <%#Eval("ShipNo") %>
                                        </td>
                                        <td>
                                            <%#Eval("ItemNo") %>
                                        </td>
                                        <td>
                                            <%#Eval("ShipDate") %>
                                        </td>
                                        <td>
                                            <%#Eval("Quantity") %> 
                                        </td>
                                        <td>
                                            <%#Eval("Unit") %> 
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                            
                        </table>
                    </td>
                </tr>
            <!--隐藏部分end-->
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <div class="rightbt">
   <a href="../Shop/OrderHistory.aspx" class="submitlink"><%=GetLangString("BackToHistoryOrder")%></a>
   </div>
   </form>
</asp:Content>
